cmake_minimum_required(VERSION 3.5)

project(lewc_ui LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_PREFIX_PATH C://Qt//Qt5.14.2//5.14.2//mingw73_64)

find_package(Qt5 COMPONENTS Widgets REQUIRED)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

if(ANDROID)
  add_library(lewc_ui SHARED
          src/main.cpp
          src/mainwindow.cpp
          src/include/mainwindow.h
          src/mainwindow.ui
  )
else()
  add_executable(lewc_ui
          src/main.cpp
          src/mainwindow.cpp
          src/include/mainwindow.h
          src/mainwindow.ui
          )
endif()

target_link_libraries(lewc_ui PRIVATE Qt5::Widgets ${PROJECT_SOURCE_DIR}/bin/core.dll)